\section{GUI Boss}
\label{app:GUIboss}

In this section we will explain in detail a Graphical User Interface that allows
to command the Spring agent as if it where a player control. Therefore this
class was named {\it GUIboss}.

\subsection{Motivation}

Due to the lack of literature found about the inner workings of SpringRTS and
wrapper used,  we have been forced to learn by ourselves. Furthermore, as Spring
requires to put the Java module in an specific folder with a special properties,
the most feasible way to test all possible functionalities during the game, was
to give to the program all the possible functionalities.

\subsection{Funcionalities}

The functionalities activated in GUIBoss, useful for this work are: showing the
events and economy, tracking of enemies in radar and LOS, showing the team
units, attack move and build units.

\subsubsection{Show events}

The list selected in \autoref{fig:GUIbossEvents} shows all events sent by the
Spring Engine.

\begin{figure}[htp]
	\begin{center}
		\includegraphics[width=10cm]{images/GUIbossEvents.png}
	\end{center}
	\caption{Screenshot of GUI boss showing events}
	\label{fig:GUIbossEvents}
\end{figure}

\subsubsection{Economy}

Each few seconds, the part selected in \autoref{fig:GUIbossEconomy} is refreshed
with the current economy state.

\begin{figure}[htp]
	\begin{center}
		\includegraphics[width=10cm]{images/GUIbossEconomy.png}
	\end{center}
	\caption{Screenshot of GUI boss showing the economy state}
	\label{fig:GUIbossEconomy}
\end{figure}

\subsubsection{Tracking of enemies in radar and in LOS}

Each time an event {\it enemyEnterLOS}, {\it enemyEnterRadar}, {\it
enemyLeaveLOS} or {\it enemyLeaveRadar} is sent, the windows boxed in
\autoref{fig:GUIbossRadarLOS} are refreshed, tracking of enemies in radar and in
LOS.

\begin{figure}[htp]
	\begin{center}
		\includegraphics[width=10cm]{images/GUIbossRadarLOS.png}
	\end{center}
	\caption{Screenshot of GUI boss tracking the enemies}
	\label{fig:GUIbossRadarLOS}
\end{figure}

\subsubsection{Showing the team units}

Each time an event {\it unitCreated}, {\it unitFinished}, {\it unitGiven} or
{\it unitCaptured} or {\it unitDamaged} is sent, the window boxed in
\autoref{fig:GUIbossTeamUnits} is refreshed, showing the current team units.

\begin{figure}[htp]
	\begin{center}
		\includegraphics[width=10cm]{images/GUIbossTeamUnits.png}
	\end{center}
	\caption{Screenshot of GUI boss showing the team units}
	\label{fig:GUIbossTeamUnits}
\end{figure}

\subsubsection{Atack}

To order an attack, it is necessary to click in the three places boxed in
\autoref{fig:GUIbossAtack}: the team unit which will execute the attack, an
enemy unit in LOS and {\it Attack} button.

\begin{figure}[htp]
	\begin{center}
		\includegraphics[width=10cm]{images/GUIbossAtack.png}
	\end{center}
	\caption{Screenshot of GUI boss important parts for attack}
	\label{fig:GUIbossAtack}
\end{figure}

\subsubsection{Movement}
\label{app:Movement}

There are two options to order movement, define the target by coordinates (shown
in \autoref{fig:GUIbossMoveXZ}) or choose a metal mine from the mines list
(shown in \autoref{fig:GUIbossMoveMines}). In both cases, it is necessary to
choose the unit which will execute the movement, the target and click to the
{\it Move} button.  But if the target is a mine, in addition of the previous
requisites, it is necessary to click in  {\it enable mines selection}.

It is necessary to take in account that distances shown in mines list an
coordinates are not absolutes, they are relatives to the unit which will execute
the action.

\begin{figure}[htp]
	\begin{center}
		\includegraphics[width=10cm]{images/GUIbossMoveXZ.png}
	\end{center}
	\caption{Screenshot of GUI boss important parts for move units at specific
	coordinates}
	\label{fig:GUIbossMoveXZ}
\end{figure}

\begin{figure}[htp]
	\begin{center}
		\includegraphics[width=10cm]{images/GUIbossMoveMines.png}
	\end{center}
	\caption{Screenshot of GUI boss important parts for move units at metal
	mines}
	\label{fig:GUIbossMoveMines}
\end{figure}


\subsubsection{Build units}

Build a unit is similar to order a movement (\autoref{app:Movement}) with only
two differences, boxed in \autoref{fig:GUIbossConstruct}: click on {\it
Construct} button and, in addition, choose a building unit form constructions
list.

\begin{figure}[htp]
	\begin{center}
		\includegraphics[width=10cm]{images/GUIbossConstruct.png}
	\end{center}
	\caption{Screenshot of GUI boss important parts for building units}
	\label{fig:GUIbossConstruct}
\end{figure}

